Skip to content

Comments

test: avoid Fatalf in concurrent scenario helper#52

Merged
davidahmann merged 1 commit intomainfrom
codex/fix-scenario-fatalf-goroutine
Feb 18, 2026
Merged

test: avoid Fatalf in concurrent scenario helper#52
davidahmann merged 1 commit intomainfrom
codex/fix-scenario-fatalf-goroutine

Conversation

@davidahmann
Copy link
Collaborator

Problem

internal/scenarios/scenario_test.go used a helper that could call t.Fatalf from worker goroutines in runConcurrentScenario, which is unsafe for Go test failure semantics.

Changes

  • split command execution into:
    • runCommand(...) returning (output, exitCode, error) without test-fatal behavior
    • mustRunCommand(...) for non-concurrent call sites that fail the test on execution error
  • updated concurrent scenario workers to propagate execution errors through errCh instead of invoking t.Fatalf in goroutines

Validation

  • go test ./internal/scenarios -count=1 -tags=scenario -v
  • make prepush-full
  • pre-push hook make prepush during git push

@davidahmann davidahmann merged commit 1216c15 into main Feb 18, 2026
5 checks passed
@davidahmann davidahmann deleted the codex/fix-scenario-fatalf-goroutine branch February 18, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant